Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update collections import for compatibility with newer Python versions #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

teixeirazeus
Copy link

This PR updates the import statements for defaultdict and MutableSet to ensure compatibility with newer versions of Python.
In newer Python versions, MutableSet has been moved from collections to collections.abc.
The updated import statements now handle this change by using a try-except block to maintain compatibility with both older and newer versions of Python.

@teixeirazeus teixeirazeus requested a review from a team as a code owner July 13, 2024 21:20
@teixeirazeus teixeirazeus requested review from SudKul and removed request for a team July 13, 2024 21:20
Copy link

@RahulVadisetty91 RahulVadisetty91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r342

Since MutableSet was moved to collections.abc in Python 3.3+, modify it as follows

from collections.abc import MutableSet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants